<h1><span></span><?= lang('label_deal_details') . ' (' . strtoupper($details->inv_num) . ')' ?></h1>

<ul class="breadcrumb">
    <li><a href="<?= base_url() ?>"><?= lang('label_home') ?></a></li>
    <li><a href="<?= base_url("user/profile") ?>"><?= lang('label_profile') ?></a></li>
    <?php if (isset($sales)) { ?>
        <li><a href="<?= base_url("user/sales") ?>"><?= lang('label_menu_link_sales') ?></a></li>
    <?php } else { ?>
        <li><a href="<?= base_url("user/purshases") ?>"><?= lang('label_menu_link_purshases') ?></a></li>
    <?php } ?>
    <li><?= lang('label_deal_details') . ' (' . strtoupper($details->inv_num) . ')' ?></li>
</ul>


<div class="page">
    <?php $this->load->view('template/default/user/top') ?>
    <?php $this->load->view('template/default/user/side') ?>
    <div class="profile_page">
        <h2 class="profile_page_title"><?= lang('label_profile') ?> &raquo; <strong><?= lang('label_deal_details') . ' (' . strtoupper($details->inv_num) . ')' ?></strong></h2>

        <?php if (count($details) > 0) { ?>
            <form action="<?= current_url() ?>" method="post">
                <div class="invoice">
                    <b>&raquo; <?= lang('label_invoices_id') ?> :</b>  <?= strtoupper($details->inv_num) ?>
                    <br /><b>&raquo; <?= lang('label_product_name') ?> :</b>  <a href="<?= base_url('products/view/' . $details->product_id) ?>" target="_blank"><?= $details->title ?></a>
                    <br /><b>&raquo; <?= lang('label_product_price') ?> :</b><?= $details->price ?>
                    <br /><b>&raquo; <?= lang('label_wallet_amount') ?> :</b><?= $details->amount ?>
                    <br /><b>&raquo; <?= lang('label_shiping_total') ?> :</b><?= $details->shiping ?>
                    <?php if ($details->get_by_hand == 'YES') { ?>
                        (<?= lang('label_note') . ': ' . lang('label_get_by_hand') ?>)
                    <?php } elseif ($details->cash_on_delivery == 'YES') { ?>
                        (<?= lang('label_note') . ': ' . lang('label_cash_on_delivery') ?>)
                    <?php } ?>
                    <br /><b>&raquo; <?= lang('label_discount_total') ?> :</b>
                    <?php if ($data->accept == 'NO' && $data->canceled == 'NO') { ?>
                        <input type="number" name="discount" value="<?= $details->discount ?>"><?= lang('label_rial') ?>
                    <?php } else { ?>
                        <?= $details->discount ?>
                    <?php } ?>
                    <br /><b>&raquo; <?= lang('label_inv_total') ?> :</b><?= $details->total_price ?>
                    <?php if ($details->color) { ?>
                        <br /><b>&raquo; <?= lang('label_product_color') ?> :</b><?= $details->color ?>
                    <?php } ?>
                    <?php if ($details->size) { ?>
                        <br /><b>&raquo; <?= lang('label_product_size') ?> :</b><?= $details->size ?>
                    <?php } ?>
                    <?php if ($details->get_by_hand == 'NO') { ?>
                        <br /><b>&raquo; <?= lang('label_address') ?> :</b>  <?= $details->address ?>
                        <br /><b>&raquo; <?= lang('label_menu_link_city') ?> :</b>  <?= get_city_name_id($details->city_id) ?>
                        <br /><b>&raquo; <?= lang('label_mobile') ?> :</b>  <?= $details->mobile ?>
                    <?php } ?>
                </div>
            </form>
        <?php } else { ?>
            <div class="unsaved">
                <img src="<?php echo str_replace('/index.php', '', $_SERVER['SCRIPT_NAME']) ?>/<?php echo APPPATH ?>views/<?php echo $this->themes->Cms_themes() ?>/images/unsaved.png" alt="" />
                <br /><?= lang('message_dont_have_subscribers') ?>
            </div>
            <br /><br /><br /><br />
        <?php } ?>
    </div></div>
